import http from "@/http";
import { HistoricalQuotation, HistoricalQuotationQuery } from './type';

// 分页查询历史报价单列表
export const getHistoricalQuotationListApi = (params: HistoricalQuotationQuery) => {
  return http.get("/historicalQuotation/queryHistoricalQuotationList", params);
};

// 根据ID获取历史报价单详情
export const getHistoricalQuotationDetailApi = (id: number) => {
  return http.get(`/historicalQuotation/getHistoricalQuotationDetail/${id}`);
};

// 保存结构件报价单
export const saveStructureQuotationApi = (data: any) => {
  return http.post("/historicalQuotation/saveStructureQuotation", data);
}; 

// 根据项目ID获取报价单数据
export const getQuotationDataByProjectIdApi = (id: number) => {
  return http.get(`/historicalQuotation/quotation/project/${id}`);
};
